<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSysMenuTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('basedata_menu', function (Blueprint $table) {
            $table->integer('id', true);
            $table->string('name', 50)->nullable()->comment('菜单名称');
            $table->string('path', 100)->nullable()->comment('菜单地址');
            $table->integer('meta_id')->nullable()->comment('属性列表');
            $table->integer('parent_id')->nullable()->default(0)->comment('父ID');
            $table->string('redirect', 50)->nullable()->comment('跳转地址');
            $table->string('component', 50)->nullable()->comment('组成结构');
            $table->integer('sort')->default(0)->comment('排序');
            $table->integer('creator_')->default(0)->comment('创建人');
            $table->dateTime('createtime')->nullable()->comment('创建时间');
            $table->integer('editor_')->default(0)->comment('编辑人');
            $table->dateTime('edittime')->nullable()->comment('编辑时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('basedata_menu');
    }
}
